<?php

declare(strict_types=1);

namespace App\Model;

use Hyperf\DbConnection\Model\Model;

/**
 * 意见反馈
 */
class FeedBack extends Model
{
    protected $table = 'feedback';

    protected $fillable = [
        'user_id', 'content', 'flag', 'pics'
    ];

    static function addRecord($userId = 0, $content = '', $pics = '')
    {
        return self::create([
            'user_id' => $userId,
            'content' => $content,
            'pics' => $pics,
            'flag' => 1
        ]);
    }
}
